﻿namespace Whse.Api.Applications.Caching
{
    public class CacheService : AbstractCacheService, ICachePreheatable
    {
        public CacheService(ICacheProvider cacheProvider, IServiceProvider serviceProvider)
            : base(cacheProvider, serviceProvider)
        {
        }

        public override async Task PreheatAsync()
        {
            var cacheKey = ConcatCacheKey("WhsePreheat", $"WhsePreheat");
            await CacheProvider.SetAsync(cacheKey, "WhsePreheat", TimeSpan.FromSeconds(1111));
        }
    }
}
